<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="renderer" content="webkit">
		<title>角色管理</title>
	    <meta name="keywords" content="角色管理">
	    <meta name="description" content="角色管理">
		<!-- css -->
		<link href="../css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
	    <link href="../css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
	    <link href="../css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
	    <link href="../css/animate.min.css" rel="stylesheet">
	    <link href="../css/style.min862f.css?v=4.1.0" rel="stylesheet">
   		<link href="../css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
	    <link href="../css/plugins/iCheck/custom.css" rel="stylesheet">
	    <!-- js/css 角色下拉框-->
		<link href="../css/plugins/chosen/chosen.css" rel="stylesheet">
	    <!-- tree css -->
	    <link rel="stylesheet" href="../common/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	    <style type="text/css">
	    	.row{
	    		padding: 0px;
	    		margin: 0px;
	    	}
	    	
	    	ul.ztree {
				margin-top: 10px;
				border: 1px solid #617775;
				background: #f0f6e4;
				height: 400px;
				overflow-y: scroll;
				overflow-x: auto;
			}
			
			.model_td {
				padding: 5px;
			}
			
			.line_td{
				border-bottom: 1px dashed #ddd;
			}
			.chosen-container-single{
				width:100%!important;
			}
			
	    </style>
	</head>
	<body class="gray-bg">
	    <div class="wrapper wrapper-content animated fadeInRight">
	        <div class="ibox float-e-margins">
	        
				<div class="ibox-content">
	                <div class="panel-body">
				        <div id="toolbar" class="btn-group">
				            <form id="formSearch">
				        		<div style="float: left;">
							        <button id="btnAdd" type="button" class="btn btn-primary power-btn" power="RoleAdd">
						                <span class="fa fa-plus" aria-hidden="true"></span> 新增
						            </button>
						            <button id="btnDelete" type="button" class="btn btn-primary power-btn" power="RoleDelete">
						                <span class="fa fa-trash" aria-hidden="true"></span> 删除
						            </button>
								    <button type="button" id="btnQuery" class="btn btn-primary power-btn" power="RoleQuery"> <span class="fa fa-search" aria-hidden="true"></span> 查 询 </button>
							        <button type="reset" id="btnBaseDataRest" class="btn btn-primary"><span class="fa fa-eraser" aria-hidden="true"></span> 重 置</button>
						        </div>
						        <div style="float: left;">&nbsp;</div>
						        <div style="float: left;">
						        	<input type="text" style="font-size: 12px;" placeholder="请输入角色名称" class="form-control" id="roleName">
						        </div>
						        <div style="float: left;">&nbsp;</div>
						        <div style="float: left;line-height:0px;">
						        	<input placeholder="请输入有效开始日期" style="font-size: 12px;" name="startValidDate" class="laydate-icon form-control layer-date" id="start">
						        </div>
						        <div style="float: left;">&nbsp;</div>
						        <div style="float: left;line-height:0px;">
						        	<input placeholder="请输入有效结束日期" style="font-size: 12px;" name="endValidDate" class="laydate-icon form-control layer-date" id="end">
						        </div>
 				            </form>
				        </div>
				        <table id="tbRole"></table>
				    </div>
				    
				    <!-- 弹出框 -->
				    <div class="modal inmodal fade" id="roleModal" tabindex="-1" role="dialog" aria-hidden="true">
                    	 <div class="modal-dialog" >
                         	<div class="modal-content animated">
                            	<div class="modal-header">
                                 	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
                                 	<h4 class="modal-title">添加角色</h4>
                                </div>
                               	<div class="modal-body">
                               		<div id="edit">
	                                   	 <form class="form-horizontal m-t" id="roleForm">
	                                   	 	<input type="hidden" id="modalType" value="" />
	                                   	 	<input type="hidden" id="roleId" value="" />
				                            <div class="form-group">
				                                <label class="col-sm-3 control-label">角色名称：</label>
				                                <div class="col-sm-8">
				                                    <input id="roleName" name="roleName" class="form-control" type="text">
				                                </div>
				                            </div>
				                            <div class="form-group">
				                                <label class="col-sm-3 control-label">有效期限：</label>
				                                <div class="col-sm-8">
                                           			<input id="validDate" name="validDate" class="laydate-icon form-control layer-date">
				                                </div>
				                            </div>
				                            <div class="form-group">
				                            	<label class="col-sm-3 control-label">角色组织：</label>
				                                <div class="col-sm-8">
		                            			   <input id="orgId" type="hidden"  name="orgId" />
		                            			   <input id="orgName" type="text" readonly class="form-control" style="background-color: #fff;" onclick="showOrgMenu(); return false;"/>
												   <div id="orgContent" class="menuContent" style="display:none; position: absolute; z-index: 10;">
														<ul id="treeOrgList" class="ztree" style="margin-top:0; width:365px;"></ul>
												   </div>
<!-- 													<select id="role-business" name="orgId" data-placeholder="选择加盟商..." class="chosen-select" tabindex="2"></select> -->
				                                </div>
				                            </div>
<!-- 				                            <div class="form-group"> -->
<!-- 			                                	<label class="col-sm-3 control-label">数据类型：</label> -->
<!-- 				                                <div class="col-sm-8"> -->
<!-- 				                                     <div class="i-checks" id="dataType-div"></div> -->
<!-- 				                                </div>	 -->
<!-- 			                                </div> -->
				                            <div class="form-group">
				                            	<div>
					                            	<label class="col-sm-3 control-label">备注：</label>
					                                <div class="col-sm-8">
						                            	<textarea id="remark" name="remark" rows="3" cols="20" class="form-control"></textarea>
					                                </div>
					                            </div>
				                            </div>
				                        </form>
			                        </div>
	                               	<div id="detail" class="form-horizontal m-t">
			                            <div class="form-group">
			                                <label class="col-sm-3 control-label">角色名称：</label>
			                                <div class="col-sm-8">
			                                    <label id="roleName" name="roleName" class="form-control"></label>
			                                </div>
			                            </div>
			                            <div class="form-group">
			                            	<label class="col-sm-3 control-label">有效期限：</label>
			                                <div class="col-sm-8">
			                                    <label id="validDate" name="validDate" class="form-control"></label>
			                                </div>
			                            </div>
			                            <div class="form-group">
			                            	<label class="col-sm-3 control-label">角色组织：</label>
			                                <div class="col-sm-8">
			                                    <label id="orgName" name="orgName" class="form-control"></label>
			                                </div>
			                            </div>
<!-- 			                            <div class="form-group"> -->
<!-- 		                                	<label class="col-sm-3 control-label">数据类型：</label> -->
<!-- 			                                <div class="col-sm-8"> -->
<!-- 			                                     <label class="form-control" name="dataTypeName"></label> -->
<!-- 			                                </div>	 -->
<!-- 		                                </div> -->
			                            <div class="form-group">
			                            	<label class="col-sm-3 control-label">备注：</label>
			                                <div class="col-sm-8">
			                                    <textarea id="remark" name="remark" rows="3" cols="20" readonly="readonly" style="background-color: #FFF;" class="form-control"></textarea>
			                                </div>
			                            </div>
	                               	</div>
                               	</div>
                               	<div class="modal-footer">
                                   	<button type="button" class="btn btn-white" data-dismiss="modal"><span class="fa fa-close" aria-hidden="true"></span> 关 闭 </button>
                                   	<button type="submit" class="btn btn-primary" id="btnSave"><span class="fa fa-save" aria-hidden="true"></span> 保 存 </button>
                               	</div>
                             </div>
                         </div>
                     </div>
                     
                    <!-- 角色授权弹出框 -->
                    <div class="modal inmodal fade" id="rolePrimaryModal" tabindex="-2" role="dialog" aria-hidden="true">
                    	 <div class="modal-dialog" style="width: 50%;">
                         	<div class="modal-content animated">
                            	<div class="modal-header">
                                 	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
                                 	<h4 class="modal-title">添加角色</h4>
                                </div>
                               	<div class="modal-body" style="padding: 10px;">
                               		<!-- 角色隐藏Id -->
                               		<input type="hidden" id="roleId" value="" />
                               		<table style="width: 100%">
                               			<!-- <tr>
                               				<td class="model_td" style="width: 200px;">栏目菜单权限</td>
                               				<td class="model_td">功能操作权限</td>
                               			</tr> -->
                               			<tr>
                               				<td class="model_td" style="width: 200px;"><ul id="treeUserMenu" class="ztree"></ul></td>
                               				<td id="moduleTd" class="model_td" style="vertical-align: top;"></td>
                               			</tr>
                               		</table>
                               	</div>
                               	<div class="modal-footer">
                                   	<button type="button" class="btn btn-white" data-dismiss="modal"><span class="fa fa-close" aria-hidden="true"></span> 关 闭 </button>
                                   	<button type="submit" class="btn btn-primary" id="btnPrimarySave"><span class="fa fa-save" aria-hidden="true"></span> 保 存 </button>
                               	</div>
                             </div>
                         </div>
                     </div>
	            </div>
			</div>
		</div>
		<!-- js -->
		<script src="../js/jquery.min.js?v=2.1.4"></script>
	    <script src="../js/bootstrap.min.js?v=3.3.6"></script>
	    <script src="../js/content.min.js?v=1.0.0"></script>
	    <script src="../js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
	    <script src="../js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
	    <script src="../js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
	    <script src="../js/plugins/validate/jquery.validate.min.js"></script>
	    <script src="../js/plugins/sweetalert/sweetalert.min.js"></script>
	    <script src="../js/plugins/layer/laydate/laydate.js"></script>
	    <script src="../js/plugins/iCheck/icheck.min.js"></script>
	    <!-- tree js -->
	    <script type="text/javascript" src="../common/zTree/js/jquery.ztree.core.js"></script>
		<script type="text/javascript" src="../common/zTree/js/jquery.ztree.excheck.js"></script>
		<script type="text/javascript" src="../common/zTree/js/jquery.ztree.exedit.js"></script>
		<!-- js/css 下拉框-->
	    <script src="../js/plugins/chosen/chosen.jquery.js"></script>
		<script src="../common/js/aes.js" type="text/javascript"></script>
		<script src="../common/js/CommonUtils.js"></script>
<!-- 		<script src="../js/demo/form-advanced-demo.min.js"></script> -->
	    <script src="role_list.js"></script>
	</body>
</html>
